package com.manycomp;

import java.util.Comparator;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:周次煜
 * Date: 2024-03-08
 * Time：8:23
 */

/**
 * 姓名比较器
 * 没有发生向上转型
 * <> 中调用该类即可
 */

public class NameSort implements Comparator<Student1> {

    @Override
    public int compare(Student1 o1, Student1 o2) {
        return o1.name.compareTo(o2.name);
    }

}
